home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
User's Choice Windows CD
/
User's Choice Windows CD (CMS Software)(1993).iso
/
win_q_t
/
trem.zip
/
TERMINAL.C
< prev
next >
Wrap
Text File
|
1991-05-11
|
2KB
|
76 lines
/************************************************************************
*
* Copyright (c) 1991 Microsoft Corporation. All Rights Reserved.
*
*-----------------------------------------------------------------------
*
* Project: Windows Terminal Example
*
* Module: terminal.c
*
* Author: Bryan A. Woodruff (baw)
*
*
* Remarks: A terminal communication example for Windows 3.0.
* This is to show a better way to handle asynchronous
* communications rather than the brain-dead way TTY.C
* handles it.
*
* This example is a TTY example - no codes are translated
* besides the necessary LF, CR, BS, etc.
*
*
* Revisions:
* 01.00.000 5/ 9/91 baw Wrote it
*
************************************************************************/
// define GLOBAL definitions... all other modules reference these as
// externals
#define GLOBALDEFS
#include "terminal.h"
/************************************************************************
* int PASCAL WinMain( HANDLE hInstance, HANDLE hPrevInstance,
* LPSTR lpszCmdLine, int nCmdShow )
*
* Description:
* This is the main window procedure.
*
* Comments:
* 5/ 8/91 baw Wrote it.
*
************************************************************************/
int PASCAL WinMain( HANDLE hInstance, HANDLE hPrevInstance,
LPSTR lpszCmdLine, int nCmdShow )
{
HWND hwndTerminal ;
MSG msg ;
if (!hPrevInstance)
if (!InitApplication( hInstance ))
return ( FALSE ) ;
if (!InitInstance( hInstance, nCmdShow, &hwndTerminal ))
return ( FALSE ) ;
while (GetMessage( &msg, NULL, 0, 0 ))
{
if (!TranslateAccelerator( hwndTerminal, hAccel, &msg ))
{
TranslateMessage( &msg ) ;
DispatchMessage( &msg ) ;
}
}
return ( msg.wParam ) ;
} /* end of WinMain() */
/************************************************************************
* End of File: terminal.c
************************************************************************/